<!DOCTYPE html>
<html >
	<head>
<include file="Public:headinc" />
<link href="<?php echo MY_CDN; ?>/css/show.css" rel="stylesheet" />
<link href="<?php echo MY_CDN; ?>/css/comment.css" rel="stylesheet" />
<link href="<?php echo MY_CDN; ?>/js/prettify/src/prettify.css" rel="stylesheet" />
<include file="Public:pagestyle" />
	</head>
	<body>
<!-- navigation -->
<include file="Public:nav" />
<!-- // navigation -->
		
<!-- header -->
<include file="Public:header" />
<!-- // header -->
		
<!-- category -->
<include file="Public:category" />
<!-- category -->
		
	<!-- container -->
	<div class="y-bigBlankBar"></div>
	<div class="y-wrapper990">
		<div class="y-leftContainer y-pullLeft">
			<div class="y-left-wrapper">
				<div class="y-content-title">
					<h2 class="y-shadow" id="articleTitle">{$one['title']}</h2>
					<small><span class="y-pullRight"><a href="javascript:;" id="readmode">阅读模式</a></span>{:date('y年m月d日 H点i分', $one['posttime'])} &nbsp;&nbsp; {$one['viewnum']} 次阅读</small>
				</div>
				<div class="y-content" id="articleCon">
					{$one['content']}
				</div>
				
				<div class="y-prenext">
					<span class="y-prev">上一篇&nbsp;&nbsp;</span>
					<?php if(is_array($pre)) { ?>
					<span><a href="{:y_u('Detail/index', 'id='.$pre['id'])}" title="{$pre['title']}">{$pre['title']}</a></span>
					<?php } ?>
					<br />
					<span class="y-next">下一篇&nbsp;&nbsp;</span>
					<?php if(is_array($next)) { ?>
					<span><a href="{:y_u('Detail/index', 'id='.$next['id'])}" title="{$next['title']}">{$next['title']}</a></span>
					<?php } ?>
				</div>
				
				<div class="y-relative">
					<h4>相关文章</h4>
					<div class="y-relative-con">
						<div class="y-relative-con-left y-pullLeft">
							<iframe src="__ROOT__/bg.php" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
						</div>
						<div class="y-relative-con-center y-pullLeft">
							<ul>
<Article:list field="id,title" where="articletypeid='.$one['articletypeid'].'" limit="6" data="rela"></Article:list>
<foreach name="rela" item="v">
<li><a href="{:y_u('Detail/index', 'id='.$v['id'])}" title="{$v['title']}">{$v['title']}</a></li>
</foreach>
							</ul>
						</div>
						<div class="y-relative-con-right y-pullRight">
							<iframe src="__ROOT__/bg.php" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
						</div>
						<div class="y-clear"></div>
					</div>
				</div>
				
				<!-- 评论 -->
				<div id="commentList">
					<h4>离谱说</h4>
					{:W('CommentList', array('articleid'=>$one['id']))}
				</div>
				<!-- 评论表单 -->
				<div class="y-blankBar"></div>
				<div class="y-form">
					<div>
						<form action="" name="f1" id="f1" method="post">
							<div><input type="text" name="nickname" id="nickname" class="input-xlarge y-author" maxlength="12">(* 昵称)</div>
							<div><input type="text" name="email" id="email" class="input-xlarge y-email">(* 邮箱 不可见)<input type="checkbox" id="avatar" checked="checked"/><a href="http://en.gravatar.com/" target="_blank">使用我的Gravatar通用头像</a></div>
							<div><input type="text" name="website" id="website" class="input-xlarge y-website">(网址以 http:// 开头)</div>
							<div>Advertisement</div>
							<div>advertisement content</div>
							<div class="y-formTextarea">
								<div class="y-formFace" id="y-formFace"></div>
								<div class="y-formText">
									<textarea name="content" id="content" rows="4" maxlength="200"></textarea><br />
									<strong id="replyInfo"></strong>
								</div>
							</div>
							<div>
								<table border="0" width="100%" align="center">
									<tr>
										<td align="left"><input type="checkbox" name="notifyme" id="notifyme" value="1"/>有人回复时邮件通知我</td>
										<td align="right">
											<input type="button" value="提交" id="ySubmitBtn" class="y-btn y-btn-orange" onclick="postData()"/>	
											<input type="hidden" value="0" id="pid" /><!-- 回复谁 -->
										</td>
									</tr>
								</table>
							</div>
						</form>
					</div>
				</div>
				<script type="text/javascript" src="<?php echo MY_CDN; ?>/js/commentform.js"></script>
				<!-- // 评论 -->
				
			</div>
		</div>
		
		<div class="y-rightContainer y-pullRight">
<include file="Public:rightArticleList"/>
		</div>
		<div class="y-clear"></div>
	</div>
	<!-- // container -->
		
<include file="Public:footer" />
<script src="<?php echo MY_CDN; ?>/js/article.js"></script>
<script src="<?php echo MY_CDN; ?>/js/YRead.js"></script>
<script src="<?php echo MY_CDN; ?>/js/prettify/src/prettify.js"></script>
<script src="<?php echo MY_CDN; ?>/js/History.js"></script>

<script>
var articleid = '<?php echo $one['id']; ?>';
new YRead().init('readmode', function(obj){
	var str = document.getElementById('articleCon').innerHTML;
	obj.innerHTML = str;
});

// 高亮
prettyPrint();

// 记录浏览记录
var artTitle = document.getElementById('articleTitle').innerHTML;
new History('y_art').add(artTitle, window.location);
</script>
	</body>
</html>